<?php
/**
 * Created by PhpStorm.
 * User: Frings
 * Date: 16/5/19
 * Time: 下午1:57
 */

namespace app\models;

/**
 * API接口返回状态定义
 * Class ApiResponseStatusEnum
 * @package app\models
 */
class ApiResponseStatusEnum
{
    /**
     * success (0)
     * @return ApiResponseStatus
     */
    public static function Success()
    {
        return new ApiResponseStatus(0, 'success');
    }

    /**
     * 系统错误 (1000)
     * @return ApiResponseStatus
     */
    public static function OtherError()
    {
        return new ApiResponseStatus(1000, '系统错误');
    }

    /**
     * 账户验证失败 (1001)
     * @return ApiResponseStatus
     */
    public static function AccountError()
    {
        return new ApiResponseStatus(1001, '账户验证失败');
    }

    /**
     * 时间戳失效 (1002)
     * @return ApiResponseStatus
     */
    public static function TimestampError()
    {
        return new ApiResponseStatus(1002, '时间戳失效');
    }

    /**
     * 签名认证失败 (1003)
     * @return ApiResponseStatus
     */
    public static function SignError()
    {
        return new ApiResponseStatus(1003, '签名认证失败');
    }

    /**
     * 参数解析错误 (1007)
     * @return ApiResponseStatus
     */
    public static function ParamsParseError()
    {
        return new ApiResponseStatus(1007, '参数解析错误');
    }

    /**
     * 参数错误 (1008)
     * @return ApiResponseStatus
     */
    public static function ParamsError()
    {
        return new ApiResponseStatus(1008, '参数错误');
    }
}